#define NORMALPALFADELENGTH 500
#define PALSIZE 768
typedef struct 
{
	u8 palette[PALSIZE];
	long r,g,b;
	long timer;
} PALETTE_FLASH;

typedef struct 
{
	char r,g,b;
} PENTRY;

#define SETPALETTE(s,n) (long) s[0x6BC] = n

void ClearPalette(void);

#ifdef _PALETTE_
PALETTE_FLASH g_flash = {
 							NULL,0,0,0,0
						};
#else
extern PALETTE_FLASH g_flash;
extern void setPal(u8 *pal,long start,long numcol);
extern void initPalette();
extern void startPaletteFlash(long r,long g,long b,long frames);
extern void updatePaletteFlash();
extern void initPaletteFlash();
extern void fadeWholePalToBlack(int frames);
extern void setPalToBlack();
extern void popTop64Entries();
extern void pushTop64Entries();
extern u8 *g_palette;		// A pointer to the current palette
extern u8 *g_panelpalette;	// A pointer to panel palette
extern void ClearPalette(void);
#endif
